/**
 * @author:bjzhang
 * Created by MingIr on 2017/1/12.
 */
'use strict';
const isFunction = input => typeof input === 'function';
export default predicate => elemOrThunk =>
    predicate ? (isFunction(elemOrThunk) ? elemOrThunk() : elemOrThunk) : null;